<template>
  <a-layout>
    <new-nav-bar-admin class="top-bar" @changeTab="changeTab"></new-nav-bar-admin>
    <a-layout-content class="main-container">
      <!-- <div class="main-title"
           v-if="title !== ''">{{ title }}</div> -->
      <!-- <router-view /> -->
      <admin-list :role="role"></admin-list>
    </a-layout-content>
  </a-layout>
</template>

<script>
import NewNavBarAdmin from "./../../components/common/NewNavBarAdmin";
import AdminList from "./AdminList.vue";

export default {
  data () {
    return {
      role:"ROLE_TEACHER",
    };
  },
  methods:{
    changeTab(type){
      // console.log(type)
      if(type==="student")
        this.role="ROLE_STUDENT"
      else
        this.role="ROLE_TEACHER"
      // this.role=this.role==="ROLE_TEACHER"?"ROLE_STUDENT":"ROLE_TEACHER"
      // console.log("change->",this.role)
    }
  },
  components: {
    NewNavBarAdmin,
    AdminList,
  },
};
</script>

<style lang="less" scoped>
.top-bar {
  background-color: white;
}

.main-container {
  // background-color: #f4f4f5;
  margin: 0 15%;
  margin-top: 90px;
  min-height: calc(100vh - 90px);
  padding-top: 20px;

  .main-title {
    margin-bottom: 20px;
    // margin-top: 110px;
    height: 25px;
    font-size: 18px;
    font-family: PingFang SC, sans-serif;
    font-weight: bold;
    line-height: 25px;
    color: #242425;
  }
}
</style>
